﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

namespace AutoUpdater
{
    class Config
    {


        public static string workingDirectory
        {
            get
            {
                return getEnvValue("workingDirectory");
            }
        }

        public static string cronSchedule
        {
            get
            {
                return getEnvValue("cronSchedule");
            }
        }
        public static string env
        {
            get
            {
                return read("env");
            }
        }

        public static string getEnvValue(string key)
        {

            return read($"{key}_{env}");
        }


        public static string read(string key)
        {
            return ConfigurationManager.AppSettings[key];
        }

    }
}
